<!DOCTYPE html>
<html>
	<head>s
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			let str = "https://dockingwx.ryx365.com/docking"

			function urlencode(str) {
				str = (str + '').toString();
				return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
				replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
			}

			// if (process.browser) {
			// 	str = "https://" + window.location.hostname + "/docking"; // 中间页
			// }
			
			let url = urlencode(str);
			console.log(url);
			// 授信链接
			let weixiUrl =
				`https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww5d488648675d4abe&redirect_uri=${url}&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect`;
			console.log(weixiUrl);

			// https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwa7a247dce81144b2&redirect_uri=https%3A%2F%2Fsaas-test.ryx365.com%2Fh5%2F%23%2Fpages%2Flogin%2Flogin&response_type=code&scope=snsapi_base&state=STATE&agentid=1000002#wechat_redirect
		</script>
	</body>
</html>
